package com.zrrd.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zrrd.common.constants.ArticleConstants;
import com.zrrd.model.article.dtos.ArticleHomeDto;
import com.zrrd.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title ApArticleMapper
 * @description
 * @create 2023/9/18 12:13
 */
@Mapper
public interface ApArticleMapper extends BaseMapper<ApArticle> {
    /**
     *
     * @param dto   新闻dto
     * @param loadType 1：加载更多新闻，2：加载最新新闻。"__all__"：加载全部新闻
     * @return
     */
    List<ApArticle> loadArticleList(@Param("dto") ArticleHomeDto dto,
                                    @Param("type") Short loadType);

}
